<template>
  <div class="contain">
      <div class="logo" @click="goToDaily">
        <img src="../assets/quanquan.png" alt="">
      </div>
      
      <van-tabs class="navBar" active="1">
        <van-tab title="关注"  to="/home/attention"></van-tab>
        <van-tab title="发现" name="1" to="/home/discovery"></van-tab>
        <van-tab title="附近"  to="/home/near"></van-tab>
      </van-tabs>

      <div class="search">
        <img src="../assets/search.png" alt="" @click="goToSearch">
      </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

// 去我的日常
const goToDaily = () => {
  router.push('/daily')
}

// 去搜索
const goToSearch = () => {
  router.push('/search')
}

</script>

<style scoped>
.contain{
  width: 100%;
  background-color: #fff;
  display:inline-flex;
  border-bottom: 1px solid rgb(194, 194, 194);
  position: fixed;
  top: 0;
}
.logo{
  margin: 10px 10px;
  width: 30px;
  height: 30px;
}
.logo img{
  width: 30px;
  height: 30px;
}
.navBar{
  flex: 1;
  margin: 5px 50px;
}
.van-tab{
  font-family: YouYuan;
  font-weight: bold;
}
.search{
  margin-right: 10px;
  margin-top: 10px;
  width: 25px;
  height: 25px
}
.search img{
  width: 25px;
  height: 25px;
}

</style>